From 6816309bc881f27ae3f54f792ee43afa8b07f7c6 Mon Sep 17 00:00:00 2001 From: Debian Qt/KDE Maintainers Date: Tue, 25 Sep 2018 22:26:54 +0100 Subject: [PATCH] fix-glibc-2.28-build Gbp-Pq: Name fix-glibc-2.28-build.patch --- src/corelib/global/qconfig-bootstrapped.h | 12 ++++++++++-- src/corelib/io/qfilesystemengine_unix.cpp | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index 3469ebe5e..c5585ea32 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -98,10 +98,18 @@ #define QT_NO_QOBJECT #define QT_FEATURE_process -1 #define QT_FEATURE_regularexpression -1 -#define QT_FEATURE_renameat2 -1 +#ifdef __GLIBC_PREREQ +# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) +#else +# define QT_FEATURE_renameat2 -1 +#endif #define QT_FEATURE_sharedmemory -1 #define QT_FEATURE_slog2 -1 -#define QT_FEATURE_statx -1 +#ifdef __GLIBC_PREREQ +# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) +#else +# define QT_FEATURE_statx -1 +#endif #define QT_FEATURE_syslog -1 #define QT_NO_SYSTEMLOCALE #define QT_FEATURE_systemsemaphore -1 diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index be6ce48d0..3e4f33a3b 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory(); # include # include # include -# include // in case linux/fs.h is too old and doesn't define it: #ifndef FICLONE @@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp # endif # if !QT_CONFIG(statx) && defined(SYS_statx) +# include static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } # elif !QT_CONFIG(statx) && !defined(SYS_statx) -- 2.30.2